package com.miya.demo.model.dto.system;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 注册dto
 *
 * @author Caixiaowei
 * @date 2022/07/08
 */
@Data
public class RegisterDTO implements Serializable {
    private static final long serialVersionUID = 8435452038910889438L;

    @ApiModelProperty("用户名")
    @NotEmpty(message = "用户名不能为空")
    @Size(min = 5, max = 20, message = "用户名长度为6到20个字符")
    private String username;

    @ApiModelProperty("密码")
    @NotEmpty(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度为6到20个字符")
    private String password;

}
